package com.cndw.kongfu.config;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Vector;

import com.cndw.kongfu.model.ChatData;
import com.cndw.kongfu.util.TimeProcesser;

public class SimulateData {
	
	public static String[][] simulateData = {{"1", "eee", "xxadfkjaif", "2012-7-10","jy"}, {"2", "everest", "xxadfkjaif", "2012-7-10","jy"}};
	
	public static Vector<ChatData> getSimulateData() {
		Vector<ChatData> data = new Vector<ChatData>();
		for (int i = 0; i < simulateData.length; i++) {
			ChatData chatData = new ChatData();
			chatData.setId(Integer.parseInt(simulateData[i][0]));
			chatData.setName(simulateData[i][1]);
			chatData.setChat(simulateData[i][2]);
			chatData.setDate(TimeProcesser.getUnixTime());
	
			data.add(chatData);
		}
		return data;
	}
	
	public static ChatData getOne() {
			ChatData chatData = new ChatData();
			chatData.setId(Integer.parseInt(simulateData[0][0]));
			chatData.setName(simulateData[0][1]);
			chatData.setChat(simulateData[0][2]);
			chatData.setDate(TimeProcesser.getUnixTime());
		return chatData;
	}
}
